<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:p="http://primefaces.prime.com.tr/ui">

 
	<ui:composition template="/templates/common/content.xhtml">
		<ui:define name="pageTitle">Reset Password</ui:define>
		<ui:define name="body">
	<div class="container_24">
		<div class="wrapper">
			<ui:include src="/templates/common/login_sidebar.xhtml"></ui:include>
					
			<div class="grid_17">
				<div class="inside">
				<h:panelGroup rendered="#{!mAccount.loggedIn}">
					<article>
						<header>
							<h2>Reset Password</h2>
						</header>
						<div class="content">
						<h:form id="forgot-password-form">
								<p>
									<rich:message for="forgot_email" />
									<rich:message for="forgot_security" />
								</p>
								<h6>Please Enter Your Email:</h6>
								<label><h:inputText value="#{mAccount.acc.email}" id="forgot_email" validator="#{mValidatorLib.EmailValidate}"/></label>
								<h6>Secret Question:</h6>
								<label> 
									<h:selectOneMenu value="#{mAccount.acc.question}">
										<f:selectItem itemLabel="What is your ID card number ?" itemValue="What is your ID card number ?"/>	
										<f:selectItem itemLabel="What is your mother's middle name ?" itemValue="What is your mother's middle name ?" />
										<f:selectItem itemLabel="What is your lover name ?"	itemValue="What is your lover name ?" />	
										<f:selectItem itemLabel="What is your favorite pet ?" itemValue="What is your favorite pet ?" />	
									</h:selectOneMenu> 
								</label>	
								<h6>Your answer:</h6>
								<label>			
									<h:inputText value="#{mAccount.acc.answer}" id="forgot_security" validator="#{mValidatorLib.SecurityAnswerValidator}"/>
								</label>
								<h:commandLink action="#{mAccount.forgot_password}" value="Reset My Password" styleClass="button">
								</h:commandLink>			
										
								
							</h:form>
						</div>
					</article>
				</h:panelGroup>
				<h:panelGroup rendered="#{mAccount.loggedIn}">
					<h6>You already logged in !</h6>
				</h:panelGroup>
				</div>
			</div>
		</div>
	</div>
</ui:define>
</ui:composition>
</html>
